﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplyList.aspx.cs" Inherits="Announcement.ApplyList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/Default.css" rel="stylesheet" type="text/css" />
    <link href="../css/style.css" rel="stylesheet" type="text/css" />

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

</head>
<body>
<form id="form1" runat="server">
    <header id="top">
		<div class="wrapper">
			<!-- Title/Logo - can use text instead of image -->
			<div id="title">
			<a href="../ApplyList.aspx">
			<img SRC="img/lzfcjys_logo.png" alt="lzfcjys" />
			</a>
			</div>
			<!-- Top navigation -->
			<div id="topnav">
				<a href="#"><img class="avatar" SRC="img/user_32.png" alt="" /></a>
				Logged in as <b>lzfcjys</b>
				<span>|</span> <asp:LinkButton ID="lbtnExit" runat="server" 
                    onclick="lbtnExit_Click">退出</asp:LinkButton><br />
			</div>
			
			
			<!-- End of Aside links -->
		</div>
	</header>
    <div id="pagetitle">
        <div class="wrapper">
            <h1>
                首页</h1>
        </div>
    </div>
    <div id="mainbox">
        
        <div>
            <asp:ObjectDataSource ID="odsApply" runat="server" SelectMethod="GetApplyMgr" TypeName="Announcement.DAL.DataSetApplyMgrTableAdapters.ApplyMgrTableAdapter"
                DeleteMethod="DeleteById">
                <DeleteParameters>
                    <asp:Parameter Name="Id" Type="Int64" />
                </DeleteParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="odsApplyType" runat="server" DeleteMethod="Delete" InsertMethod="Insert"
                OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="Announcement.DAL.DataSetApplyTypeTableAdapters.T_ApplyTypeTableAdapter"
                UpdateMethod="Update">
                <DeleteParameters>
                    <asp:Parameter Name="Original_Id" Type="Int32" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Type_Name" Type="String" />
                    <asp:Parameter Name="Original_Id" Type="Int32" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="Id" Type="Int32" />
                    <asp:Parameter Name="Type_Name" Type="String" />
                </InsertParameters>
            </asp:ObjectDataSource>
            <table width="100%" class="stylized">
                <tr align="center">
                    <th>
                        公告编号
                    </th>
                    <th>
                        房屋坐落
                    </th>
                    <th>
                        申请类型
                    </th>
                    <th>
                        申请时间
                    </th>
                    <th>
                    </th>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox ID="txtCCode" runat="server" Width="90px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:TextBox ID="txtLocal" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlApplyType" runat="server" DataSourceID="odsApplyType" DataTextField="Type_Name"
                            DataValueField="Id" OnDataBound="ddlApplyType_DataBound">
                        </asp:DropDownList>
                    </td>
                    <td>
                        从<asp:TextBox ID="txtStartDate" runat="server" Width="70px" onclick="WdatePicker()"></asp:TextBox>到
                        <asp:TextBox ID="txtEndDate" runat="server" Width="70px" onclick="WdatePicker()"></asp:TextBox>
                    </td>
                    <td>
                        
                        <asp:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" CssClass="btn"/>
                    </td>
                </tr>
            </table>
            <asp:ListView ID="lvApplyMgr" runat="server" DataKeyNames="Id" DataSourceID="odsApply"
                OnItemCommand="lvApplyMgr_ItemCommand" OnPagePropertiesChanging="lvApplyMgr_PagePropertiesChanging">
                <ItemTemplate>
                    <tr style="background-color: #DCDCDC; color: #000000;">
                        <asp:HiddenField ID="hfId" runat="server" Value='<%# Eval("Id") %>' />
                        <td>
                            <asp:Label ID="ApplicantLabel" runat="server" Text='<%# Eval("ContractCode") %>' />
                        </td>
                        <td>
                            <asp:Label ID="LegalLabel" runat="server" Text='<%# Eval("Applicant") %>' />
                        </td>
                        <td>
                            <asp:Label ID="HouseNumLabel" runat="server" Text='<%# Eval("HouseLocated").ToString().Length>14?Eval("HouseLocated").ToString().Substring(0,14)+"...":Eval("HouseLocated") %>'
                                Width="200px" />
                        </td>
                        <td>
                            <asp:Label ID="Type_NameLabel" runat="server" Text='<%# Eval("Type_Name").ToString().Length>8?Eval("Type_Name").ToString().Substring(0,8)+"...":Eval("Type_Name") %>'
                                Width="150px" />
                        </td>
                        <td>
                            <asp:Label ID="ApplyDateLabel" runat="server" Text='<%# Eval("ApplyDate","{0:yyyy-MM-dd}")%>' />
                        </td>
                        <td>
                            <asp:CheckBox ID="IsPayCheckBox" runat="server" Checked='<%# Eval("IsPay") %>' Enabled="false" />
                        </td>
                        <td>
                            <asp:Button ID="btnRead" runat="server" CommandName="Read" Text="查看" class="btn btn-green" />
                        </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <table id="Table1" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                        border-color: #999999; border-style: none; border-width: 1px;">
                        <tr>
                            <td>
                                未返回数据，
                                <asp:LinkButton ID="lbtnAdd" runat="server" Text="点击这里" PostBackUrl="Default.aspx" />
                                新增数据。
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <LayoutTemplate>
                    <table id="Table2" runat="server" width="100%">
                        <tr id="Tr1" runat="server">
                            <td id="Td1" runat="server">
                                <table id="itemPlaceholderContainer" runat="server" width="100%" class="stylized">
                                    <tr id="Tr2" runat="server" style="background-color: #DCDCDC; color: #000000;">
                                        <th id="Th1" runat="server">
                                            公告编号
                                        </th>
                                        <th id="Th2" runat="server">
                                            申请人
                                        </th>
                                        <th id="Th3" runat="server">
                                            房屋坐落
                                        </th>
                                        <th id="Th4" runat="server">
                                            申请类型
                                        </th>
                                        <th id="Th5" runat="server">
                                            申请时间
                                        </th>
                                        <th id="Th6" runat="server">
                                            是否付费
                                        </th>
                                        <th id="Th7" runat="server">
                                            <asp:LinkButton ID="lbtnAdd" runat="server" PostBackUrl="Default.aspx" class="btn">
                                            <span class="icon icon-add"></span>新增
                                            </asp:LinkButton>
                                        </th>
                                    </tr>
                                    <tr id="itemPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="Tr3" runat="server">
                            <td id="Td2" runat="server" style="text-align: center;">
                                <p class="pagination">
                                <asp:DataPager ID="DataPager1" runat="server">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowNextPageButton="false" ShowPreviousPageButton="true" FirstPageText="|<<" PreviousPageText="<<"/>
                                        <asp:NumericPagerField ButtonType="Link" ButtonCount="5" CurrentPageLabelCssClass="pagination-active" />
                                        <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="false" ShowPreviousPageButton="false" ShowNextPageButton="true" LastPageText=">>|" NextPageText=">>"/>
                                    </Fields>
                                </asp:DataPager>
                                </p>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
            </asp:ListView>
        </div>
        
    </div>
    <footer id="bottom">
		<div class="wrapper">
			<p>Copyright &copy; 2010 <b><a href="http://www.lzfcjys.com" title="www.lzfcjys.com">www.lzfcjys.com</a></b> | Icons by <a href="http://www.lzfcjys.com">柳州市房产交易管理网</a></p>
		</div>
	</footer>
	</form>
</body>
</html>
